﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="xsl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output indent="yes" method="html" />
  <xsl:template match="FieldRef[@FieldType='ColorPicker']" mode="Text_body">
    <xsl:param name="thisNode" select="."/>
    <xsl:param name="ColorValue" select="$thisNode/@*[name()=current()/@Name]" />
    <xsl:if test="$ColorValue != ''">
      <div style="border: 1px solid #CCCCCC;height:12px;width:12px;background-color:{$ColorValue}"> </div>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>